import {useState} from 'react'
export default (props)=>{
    const [count,setCount]=useState(()=>{
        return props.num
    })
    return(<>
        <div>{count}</div>
        <div><button onClick={()=>{
            
            setCount(count=>{
                
            })
        }}>+</button></div>
    </>)
}